﻿@using JULONG.WEB.Library
@model YHWE.Web.Models.documentType

@{
    ViewBag.Title = "文档";
    paging paging = new paging();
    paging.pageSize = 10;
    dynamic pagingMode;
    var vModel = paging.content(
        Model.document.OrderByDescending(d=>d.datetime),
        out pagingMode, Html.getRoute("page").As<int>()
        );
    ViewBag.paging = pagingMode;
}

<h2>@Model.name <span style=" font-weight:100; color:#999; font-size:10px; display:none">@Model.value</span></h2>

<p>
    @Html.ActionLink("创建", "Create", new { id = Model.ID })
</p>
<table>
    <tr>
        <th></th>
        <th>
            时间
        </th>
        <th>
            标题
        </th>
        <th>
            有效
        </th>
        <th>
            排序
        </th>
    </tr>
@foreach (var item in  vModel) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
        <td>
            @String.Format("{0:g}", item.datetime)
        </td>
        <td>
            @item.title
        </td>
        <td>
            @item.able
        </td>
        <td>
            @item.rank
        </td>
    </tr>
}

</table>

@Html.Partial("paging", new { action = "Index" })